<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>{page_title}</title>
  <base href="{base_url}">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="/static/plugins/fontawesome-free/css/all.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="/static/plugins/ionicons-2.0.1/css/ionicons.min.css">
  <!-- iCheck -->
  <link rel="stylesheet" href="/static/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="/static/dist/css/adminlte.min.css">

  <!-- jQuery -->
  <script src="/static/plugins/jquery-3.6.0.min.js"></script>
  <!-- Vue -->
  <script type="text/javascript" src="/static/plugins/vue.min.js"></script>
  <!-- Layer -->
  <script type="text/javascript" src="/static/plugins/layer/layer.js"></script>
  <!-- jQuery UI 1.11.4 -->
  <script src="/static/plugins/jquery-ui/jquery-ui.min.js"></script>
  <!-- Bootstrap 4 -->
  <script src="/static/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
  <!-- AdminLTE App -->
  <script src="/static/dist/js/adminlte.js"></script>
  <script type="text/javascript">
    var ws = null;
    if ('WebSocket' in window) {
      ws = new WebSocket('{ws_url}{uid}/{ws_sub_index}');
      ws.addEventListener('close', function () {
        layer.alert('连接已关闭', {icon: 0});
      });
    } else {
      layer.alert('您的浏览器不支持WebSocket，无法接收实时数据', {icon: 2});
    }
    function str2kv(str) {
      var array = str.split('";"');
      var kv = {};
      for (var i in array) {
        var key_value = array[i].split('"="');
        kv[key_value[0]] = key_value[1];
      }
      return kv;
    }
  </script>
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">
  <nav class="main-header navbar navbar-expand navbar-white navbar-light">
    <!-- Left navbar links -->
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
      </li>
    </ul>
  </nav>
  <!-- Main Sidebar Container -->
  <aside class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <a href="javascript:void(0);" class="brand-link">
      <img src="/static/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8">
      <span class="brand-text font-weight-light">用户后台</span>
    </a>

    <!-- Sidebar -->
    <div class="sidebar">
      <!-- Sidebar user panel (optional) -->
      <div class="user-panel mt-3 pb-3 mb-3 d-flex">
        <div class="info">
          <a href="#" class="d-block">{uaccount}</a>
        </div>
      </div>
      {menu}
    </div>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0">{title}</h1>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->

    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
